<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: DeviceEntry Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00084.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">DeviceEntry Class Reference<div class="ingroups"><a class="el" href="a00530.html">Power consumption - Classes using/defining power consumption</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="DeviceEntry" -->
<p>per-device/per-account record of battery consumption, is passed to <a class="el" href="a00033.html" title="collects and formates statistical data from the battery">BatteryStats</a> on finish()  
 <a href="a00084.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00485_source.html">DeviceEntry.h</a>&gt;</code></p>

<p><a href="a00731.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4d2a5848f5e37293c54a8b74fd11c12e"></a><!-- doxytag: member="DeviceEntry::DeviceEntry" ref="a4d2a5848f5e37293c54a8b74fd11c12e" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#a4d2a5848f5e37293c54a8b74fd11c12e">DeviceEntry</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">New empty device entry. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88c979cbf6a4e8b9bdca4d31653c6720"></a><!-- doxytag: member="DeviceEntry::DeviceEntry" ref="a88c979cbf6a4e8b9bdca4d31653c6720" args="(const DeviceEntry &amp;o)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>DeviceEntry</b> (const <a class="el" href="a00084.html">DeviceEntry</a> &amp;o)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00084.html">DeviceEntry</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#a88908d05a465f7170aef905c92fc9ed9">operator=</a> (const <a class="el" href="a00084.html">DeviceEntry</a> &amp;copy)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">DeviceEntry assignment operator.  <a href="#a88908d05a465f7170aef905c92fc9ed9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#ae62ab46af997bca23e239092a946c797">swap</a> (<a class="el" href="a00084.html">DeviceEntry</a> &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps data with another DeviceEntry.  <a href="#ae62ab46af997bca23e239092a946c797"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c703e9faf3cb9d23f1d1f3e1873ac26"></a><!-- doxytag: member="DeviceEntry::name" ref="a6c703e9faf3cb9d23f1d1f3e1873ac26" args="" -->
opp_string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#a6c703e9faf3cb9d23f1d1f3e1873ac26">name</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of the device. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadcb1dba37682677f0d224b98a57a794"></a><!-- doxytag: member="DeviceEntry::draw" ref="aadcb1dba37682677f0d224b98a57a794" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#aadcb1dba37682677f0d224b98a57a794">draw</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Actual current drawn. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb655a65790a6490d77141e4ad2bf7d3"></a><!-- doxytag: member="DeviceEntry::currentActivity" ref="adb655a65790a6490d77141e4ad2bf7d3" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#adb655a65790a6490d77141e4ad2bf7d3">currentActivity</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The activity/account currently drawing power. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ee839aa662f60bea339e49fef4fb403"></a><!-- doxytag: member="DeviceEntry::numAccts" ref="a9ee839aa662f60bea339e49fef4fb403" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#a9ee839aa662f60bea339e49fef4fb403">numAccts</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The amount of different power drawing activities/acounts this device has. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61a487c73b3bf0d58219cccfe793311c"></a><!-- doxytag: member="DeviceEntry::accts" ref="a61a487c73b3bf0d58219cccfe793311c" args="" -->
double *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#a61a487c73b3bf0d58219cccfe793311c">accts</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The power already drawn for each activity/account. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9c13beb4f5944f055a9522937e0ecf7"></a><!-- doxytag: member="DeviceEntry::times" ref="ab9c13beb4f5944f055a9522937e0ecf7" args="" -->
simtime_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00084.html#ab9c13beb4f5944f055a9522937e0ecf7">times</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The time spend for each activity/account. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>per-device/per-account record of battery consumption, is passed to <a class="el" href="a00033.html" title="collects and formates statistical data from the battery">BatteryStats</a> on finish() </p>
<p>For each device, maintain the current value of the current being drawn by the device, the activity and time for which ongoing current draw is being charged. The sum over the activities is the total energy consumed by the device, but the sum of times is the total active time, not necessarily the total lifetime. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a88908d05a465f7170aef905c92fc9ed9"></a><!-- doxytag: member="DeviceEntry::operator=" ref="a88908d05a465f7170aef905c92fc9ed9" args="(const DeviceEntry &amp;copy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00084.html">DeviceEntry</a>&amp; DeviceEntry::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00084.html">DeviceEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>copy</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>DeviceEntry assignment operator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">copy</td><td>A DeviceEntry of identical element and allocator types.</td></tr>
  </table>
  </dd>
</dl>
<p>All the elements of <em>copy</em> are copied. </p>
<div class="fragment"><pre class="fragment">                                                    {
      <a class="code" href="a00084.html" title="per-device/per-account record of battery consumption, is passed to BatteryStats on finish()...">DeviceEntry</a> Temp(copy);

      <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">swap</a>(Temp);
      <span class="keywordflow">return</span> *<span class="keyword">this</span>;
    }
</pre></div>
</div>
</div>
<a class="anchor" id="ae62ab46af997bca23e239092a946c797"></a><!-- doxytag: member="DeviceEntry::swap" ref="ae62ab46af997bca23e239092a946c797" args="(DeviceEntry &amp;s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DeviceEntry::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00084.html">DeviceEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Swaps data with another DeviceEntry. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>A DeviceEntry of the same element and allocator types.</td></tr>
  </table>
  </dd>
</dl>
<p>This exchanges the elements between two DeviceEntry's in constant time. Note that the global std::swap() function is specialized such that std::swap(s1,s2) will feed to this function. </p>

<p>References <a class="el" href="a00084.html#a61a487c73b3bf0d58219cccfe793311c">accts</a>, <a class="el" href="a00084.html#adb655a65790a6490d77141e4ad2bf7d3">currentActivity</a>, <a class="el" href="a00084.html#aadcb1dba37682677f0d224b98a57a794">draw</a>, <a class="el" href="a00084.html#a6c703e9faf3cb9d23f1d1f3e1873ac26">name</a>, <a class="el" href="a00084.html#a9ee839aa662f60bea339e49fef4fb403">numAccts</a>, and <a class="el" href="a00084.html#ab9c13beb4f5944f055a9522937e0ecf7">times</a>.</p>
<div class="fragment"><pre class="fragment">                              {
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#a6c703e9faf3cb9d23f1d1f3e1873ac26" title="Name of the device.">name</a>, s.<a class="code" href="a00084.html#a6c703e9faf3cb9d23f1d1f3e1873ac26" title="Name of the device.">name</a>);
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#aadcb1dba37682677f0d224b98a57a794" title="Actual current drawn.">draw</a>, s.<a class="code" href="a00084.html#aadcb1dba37682677f0d224b98a57a794" title="Actual current drawn.">draw</a>);
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#adb655a65790a6490d77141e4ad2bf7d3" title="The activity/account currently drawing power.">currentActivity</a>, s.<a class="code" href="a00084.html#adb655a65790a6490d77141e4ad2bf7d3" title="The activity/account currently drawing power.">currentActivity</a>);
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#a9ee839aa662f60bea339e49fef4fb403" title="The amount of different power drawing activities/acounts this device has.">numAccts</a>, s.<a class="code" href="a00084.html#a9ee839aa662f60bea339e49fef4fb403" title="The amount of different power drawing activities/acounts this device has.">numAccts</a>);
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#a61a487c73b3bf0d58219cccfe793311c" title="The power already drawn for each activity/account.">accts</a>, s.<a class="code" href="a00084.html#a61a487c73b3bf0d58219cccfe793311c" title="The power already drawn for each activity/account.">accts</a>);
        <a class="code" href="a00084.html#ae62ab46af997bca23e239092a946c797" title="Swaps data with another DeviceEntry.">std::swap</a>(<a class="code" href="a00084.html#ab9c13beb4f5944f055a9522937e0ecf7" title="The time spend for each activity/account.">times</a>, s.<a class="code" href="a00084.html#ab9c13beb4f5944f055a9522937e0ecf7" title="The time spend for each activity/account.">times</a>);
    }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/power/battery/<a class="el" href="a00485_source.html">DeviceEntry.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00084.html">DeviceEntry</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
